#include<iostream>
#include<string>

using namespace std;

void reverse(string& str)
{
    for(long unsigned int i=str.size() - 1 ;i>(str.size()-1)/2;i--)
        swap(str[i],str[str.size()-i-1]);
}

int main()
{
    string str;
    cout<<"请输入字符串:";
    cin>>str;
    reverse(str);
    cout<<str;
    return 0;
}